import { AxiosRequestConfig } from "axios"

enum API {
    categories = "/categories",
    category = "/category",//末尾追加ID
    addCategory = "/addCategory",
    updateCategory = "/updateCategory",//末尾追加ID
    delCategory = "/delCategory/"
}


export const categoriesCfg: AxiosRequestConfig = Object.freeze({
    url: API.categories
})

export const categoryCfg: AxiosRequestConfig = {
    url: API.category
}

export const addCategoryCfg: AxiosRequestConfig = {
    url: API.addCategory,
    method: 'post'
}
export const updateCategoryCfg: AxiosRequestConfig = {
    url: API.updateCategory,
    method: 'put'
}

export const delCategoryCfg: AxiosRequestConfig = {
    url: API.delCategory,
    method: 'delete'
}